package com.loves.admin.service.impl;

import com.loves.admin.mapper.MsgLogMapper;
import com.loves.admin.model.MsgLog;
import com.loves.admin.service.MsgLogService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class MsgLogServiceImpl implements MsgLogService {

    @Resource
    private MsgLogMapper msgLogMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void updateStatus(String id, int status) {
        MsgLog msgLog = new MsgLog();
        msgLog.setId(id);
        msgLog.setStatus(status);
        msgLogMapper.updateById(msgLog);
    }
}
